package com.ql.controller;

import com.ql.domain.response.MenuNode;
import com.ql.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("menu")
public class MenuController {
    @Autowired
    MenuService menuService;


    @RequestMapping("/tree.do")
    @ResponseBody
    public List<MenuNode> findMenu(Integer id) {
        return menuService.selectList(id);
    }
}
